package com.wan.data.resource.converter;

import cn.hutool.core.convert.Converter;
import com.alibaba.fastjson.JSONArray;

/**
 * @author wwh
 * @date 2022/7/6 10:32
 */
public class JsonArrayConverter implements Converter<JSONArray> {
    @Override
    public JSONArray convert(Object value, JSONArray defaultValue) throws IllegalArgumentException {
        if(value == null){
            return null;
        }
        return JSONArray.parseArray(value.toString());
    }
}
